import { lazy } from 'react'
import { createBrowserRouter } from 'react-router-dom'
import MainLayout from '../pages/mainLayout/MainLayout'
import Login from '../pages/login/Login'

const Home = lazy(()=>import('../pages/home'))

export const homerouters = [
    {
        path:'/',
        element:<Home></Home>,
        title:'首页'
    }
]

let routers = createBrowserRouter(
    [
        {
            path:'/',
            element:<MainLayout></MainLayout>,
            children:homerouters
        },
        {
            path:'/login',
            element:<Login></Login>,
        },
    ]
)
export default routers